# 1 索引别名处理
# 1.1 新回款计划
# mapping
#编写者 汪腾伟
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/formDataMapping -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","xbbCode":123456,"corpid": "1","userId" : "1","platform":"web","saasMark":1,"businessType":5301}'
# 加别名
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/addAlias  -X POST -H 'Content-type: application/json' -d '{"userId":"1","corpid":"1","platform":"web","xbbCode":"123456","saasMark":1,"businessType":5301}'

# 1.2 客户对账单索引
#编写者 zcp
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/formDataMapping -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","xbbCode":123456,"corpid": "1","userId" : "1","platform":"web","saasMark":1,"businessType":5401}'
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/formDataMapping -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","xbbCode":123456,"corpid": "1","userId" : "1","platform":"web","saasMark":1,"businessType":5403}'
# 加别名
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/addAlias  -X POST -H 'Content-type: application/json' -d '{"userId":"1","corpid":"1","platform":"web","xbbCode":"123456","saasMark":1,"businessType":5401}'
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/addAlias  -X POST -H 'Content-type: application/json' -d '{"userId":"1","corpid":"1","platform":"web","xbbCode":"123456","saasMark":1,"businessType":5403}'
# 1.3 在线支付流水相关索引
#编写者 zcp
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/formDataMapping -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","xbbCode":123456,"corpid": "1","userId" : "1","platform":"web","saasMark":1,"businessType":5600}'
# 加别名
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/esInit/addAlias  -X POST -H 'Content-type: application/json' -d '{"userId":"1","corpid":"1","platform":"web","xbbCode":"123456","saasMark":1,"businessType":5600}'

# 2 corpid=0的解释处理，非经销商模板：客户对账单、对账单列表、回款计划
# （1）此时只执行非经销商的模板，因为前置执行时，tb_paas_form_explain 表还未增加经销商标识distributorMark字段
# （2）此时不能更新原Pro已有业务的默认解释（不然可能直接把3期的新字段及字段更改给刷上去），只先把回款计划和对账单的刷上，因为前置脚本要用这两个业务
# 编写者 zcp
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/script/field/initDefaultExplain -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","xbbCode":123456,"corpid": "1","userId" : "1","platform":"web", "businessList": [5301,5401,5403]}'

# 4 新回款计划的菜单初始化(tb_paas_menu默认是已删除的状态)，菜单、表单、表单解释一起刷新
# 给旧回款计划生成其上游新回款计划需提前使用其menuId相关（正常payment_task表、审批内处理都需要用到）
#编写者 汪腾伟  timeSpend 60s
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/script/fund/menu/paymentTask/init -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","corpid":"1","userId":"1","xbbCode":123456,"platform":"web","saasMark":1,"shouldUpdateTime":0, "shouldUpdateEndTime":1614952800}'

# 5 把老回款计划的自定义字段迁移到新回款计划中，字段顺序默认是排在新回款计划已有字段后面
#编写者  汪腾伟 timeSpend 600s
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/script/paymentTask/migrateCustomField -X POST -H 'Content-type: application/json' -d '{"xbbCode":123456,"businessTypes":[5301] ,"shouldUpdateTime":0, "shouldUpdateEndTime":1614952800}'

# 6 老回款计划数据迁移到新回款计划数据中 55060s
#编写者 汪腾伟
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/script/paymentTask/migrateOldPaymentToPaymentTask -X POST -H 'Content-type: application/json' -d '{"xbbCode":123456,"businessTypes":[5301] ,"shouldUpdateTime":0, "shouldUpdateEndTime":1614952800}'

# 7 同步一下老回款计划(现应收款)的子表单数据到新回款计划的子表单 1s
#编写者 汪腾伟
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/script/paymentTask/migratePaymentTaskSubData -X POST -H'Content-type: application/json' -d '{"xbbCode":123456,"businessTypes":[5301] ,"shouldUpdateTime":0, "shouldUpdateEndTime":1614952800}'

# 8 老回款计划的（应收款）的图片路径要同步复制一份到新回款计划中 0s
#编写者 汪腾伟
curl  http://playbackjobs.zjk.taeapp.com/pro/v1/script/paymentTask/migrateOldPaymentPicToPaymentTask -X POST -H 'Content-type: application/json' -d '{"xbbCode":123456,"businessTypes":[5301],"shouldUpdateTime":0, "shouldUpdateEndTime":1614952800}'